//package com.example.springbootlearn.boot;
//
//import org.springframework.core.annotation.AnnotatedElementUtils;
//import org.springframework.core.annotation.AnnotationAttributes;
//import org.springframework.stereotype.Service;
//import org.springframework.transaction.annotation.Transactional;
//
//import java.lang.reflect.AnnotatedElement;
//
///**
// * @author caiji Mr. Li
// * @date 2019/11/14 11:21
// */
//public class AnnotationAttributesBootStrap {
//
//    public static void main(String[] args) {
//        AnnotatedElement annotatedElement = TransactionalService.class;
//
//        AnnotationAttributes serviceAttribute = AnnotatedElementUtils.getMergedAnnotationAttributes(annotatedElement, Service.class);
//        AnnotationAttributes transactionalAttribute = AnnotatedElementUtils.getMergedAnnotationAttributes(annotatedElement, Transactional.class);
//
//        print(serviceAttribute);
//        print(transactionalAttribute);
//    }
//
//    private static void print(AnnotationAttributes annotationAttributes) {
//        System.out.printf("注解 @%s 属性集合 ： \n", annotationAttributes.annotationType().getName());
//
//        annotationAttributes.forEach((name, value) ->
//                System.out.printf("\t 属性 %s : %s \n", name, value));
//    }
//}
